package com.bite.ioc.component;

import com.bite.ioc.model.UserInfo;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class UserComponent {
//    @Qualifier("userInfo2")
//    @Autowired
//    private UserInfo userInfo;

    @Resource(name = "userInfo")
    private UserInfo userInfo;

    public void say(){
        System.out.println("UserComponent say...");
        System.out.println(userInfo);
    }
}
